#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
    int N;
    cin >> N;
    int a[10];
    int alen = 0;
    if(N == 0)
    {
        a[alen] = 0;
        alen++;
    }
    while(N > 0)
    {
        a[alen] = N % 10;
        alen++;
        N = N / 10;
    }
    for(int i = alen-1; i > 0; i--)
    {
        cout << a[i]<< "   ";
    }
    cout << a[0];
}